package com.sunfeng.chap4.test1;

import java.io.IOException;
import java.net.ServerSocket;

/**
 * @description:
 * @author: 孙 峰
 * @time: 2020/11/9 14:33
 */
public class Server {
    public static void main(String[] args) {
        try {
            ServerSocket serverSocket = new ServerSocket(8088);
            System.out.println("server 阻塞开始=" + System.currentTimeMillis());
            serverSocket.accept();
            System.out.println("阻塞结束=" + System.currentTimeMillis());
            serverSocket.close();

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
